using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
public class UniversalSpawnItem : SpawnItem
{
    public UnityEvent<PlayerController> SelectBehaviour;

    #region Unity方法
    private void OnTriggerEnter2D(Collider2D collision)
    {
        PlayerController playerController = collision.gameObject.GetComponent<PlayerController>();
        if (playerController != null)
        {
            SelectBehaviour?.Invoke(playerController);
            TriggerOnSelected();
        }

    }
    #endregion
}